<?php
namespace app\validate;

use think\Validate;

class CheckClasses extends Validate
{

    protected $rule =   [
        'title'  => 'require|length:1,50',
        'e_title'  => 'require|length:1,50',
        'courseid'  => 'require|number',
        'teacherid'  => 'require',
        'start'  => 'require',
        'end'  => 'require',
        'address'  => 'require|length:1,50',
        'content'  => 'require',
    ];

    protected $message  =   [
        'title.require' => '请填写班级名称！',
        'title.length' => '班级名称在1-50个字符之间！',
        'e_title.require' => '请填写Title(EN)！',
        'e_title.length' => 'Title(EN)在1-50个字符之间！',
        'courseid.require' => '请选择关联课程！',
        'courseid.number' => '关联课程ID为数字！',
        'teacherid.require' => '请选择老师！',
        'start.require' => '请选择开课时间！',
        'end.require' => '请选择结束时间！',
        'address.require' => '请填写上课地点！',
        'address.length' => '上课地点在1-50个字符之间！',
        'content.require' => '请填写培训说明！',
    ];

}